<%@ Page Title="Sprint Planning" Language="VB" MasterPageFile="~/scrum.master" AutoEventWireup="false"
    CodeFile="SprintPlanning.aspx.vb" Inherits="ScrumMaster_SprintPlanning" %>

<%@ Register TagPrefix="uc" TagName="ucTask" Src="~/uc/task.ascx" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxDataControls" Namespace="AjaxDataControls" TagPrefix="AjaxData" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pSprintHeader" runat="server">
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="lSelectProject" runat="server" Text="Select Project"></asp:Label>
                            <br />
                            <asp:DropDownList ID="ddlProjects" runat="server" Width="250px" AutoPostBack="True" />
                            <br />
                        </td>
                        <td>
                            <br />
                            <asp:Label ID="lProjectOwner" runat="server" Text="Project Owner:  "></asp:Label>
                            <asp:Label ID="lProjectOwnerName" runat="server"></asp:Label>
                            <br />
                            <asp:Label ID="lScrumMaster" runat="server" Text="Scrum Master: "></asp:Label>
                            <asp:Label ID="lScrumMasterName" runat="server"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lDevTeam" runat="server" Text="Select Development Team Members for Sprint:"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lStartDate" runat="server" Text="Sprint Start Date"></asp:Label>
                            <asp:Calendar ID="calStartDate" runat="server" BackColor="White" BorderColor="#3366CC"
                                BorderWidth="1px" CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana"
                                Font-Size="8pt" ForeColor="#003399" Height="200px" Width="220px">
                                <SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                                <SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
                                <WeekendDayStyle BackColor="#CCCCFF" />
                                <TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
                                <OtherMonthDayStyle ForeColor="#999999" />
                                <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
                                <DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
                                <TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" Font-Bold="True"
                                    Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" />
                            </asp:Calendar>
                        </td>
                        <td>
                            <asp:Label ID="lSprintEndDate" runat="server" Text="Sprint End Date: "></asp:Label>
                            <asp:Calendar ID="calEndDate" runat="server" BackColor="White" BorderColor="#3366CC"
                                BorderWidth="1px" CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana"
                                Font-Size="8pt" ForeColor="#003399" Height="200px" Width="220px">
                                <SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                                <SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
                                <WeekendDayStyle BackColor="#CCCCFF" />
                                <TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
                                <OtherMonthDayStyle ForeColor="#999999" />
                                <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
                                <DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
                                <TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" Font-Bold="True"
                                    Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" />
                            </asp:Calendar>
                        </td>
                        <td>
                            <asp:Label ID="lMultiSelect" runat="server" Text="Hold the Ctrl Key to select multiple members"></asp:Label>
                            <br />
                            <asp:ListBox ID="lbDevTeam" runat="server" SelectionMode="Multiple" Width="220px"
                                Rows="11" AutoPostBack="True"></asp:ListBox>
                            <br />
                            <asp:Label ID="lDevHours" runat="server" Text="Total Developer Hours: "></asp:Label>
                            <asp:Label ID="lSumOfDevHours" runat="server"></asp:Label>
                            <br />
                            <br />
                            <asp:Button ID="bSprintHeaderFinish" runat="server" Text="Next &gt;&gt;" CausesValidation="False" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="pSprintHeaderSummary" runat="server" Visible="False">
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="lSummary" runat="server" Text="Summary:   "></asp:Label>
                            <asp:LinkButton ID="linkEditHeader" runat="server" CausesValidation="False">Edit</asp:LinkButton>
                            <br />
                            <asp:Label ID="lSummaryProject" runat="server" Text="Project: "></asp:Label>
                            <asp:Label ID="lSummaryProjectValue" runat="server"></asp:Label>
                            <br />
                            <asp:Label ID="lSummaryProjectOwner" runat="server" Text="Project Owner: "></asp:Label>
                            <asp:Label ID="lSummaryProjectOwnerValue" runat="server"></asp:Label>
                            <br />
                            <asp:Label ID="lSummaryScrumMaster" runat="server" Text="Scrum Master: "></asp:Label>
                            <asp:Label ID="lSummaryScrumMasterValue" runat="server"></asp:Label>
                            <br />
                            <asp:Label ID="lSummaryStart" runat="server" Text="Start Date: "></asp:Label>
                            <asp:Label ID="lSummaryStartValue" runat="server"></asp:Label>
                            <br />
                            <asp:Label ID="lSummaryEnd" runat="server" Text="End Date: "></asp:Label>
                            <asp:Label ID="lSummaryEndValue" runat="server"></asp:Label>
                            <br />
                            <br />
                        </td>
                        <td>
                            <asp:Label ID="lSummaryDevHours" runat="server" Text="Total Developer Hours: "></asp:Label>
                            <asp:Label ID="lSummaryDevHoursValue" runat="server"></asp:Label>
                            <br />
                            <asp:Label ID="lSummaryDevTeam" runat="server" Text="Development Team Members: "></asp:Label>
                            <asp:BulletedList ID="blDevTeam" runat="server">
                            </asp:BulletedList>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="pSprintDetail" runat="server" Visible="False">
                <table>
                    <tr>
                        <td>
                            <br />
                            <asp:Panel ID="pFeaturesForProject" runat="server">
                                <asp:Label ID="lSelectFeature" runat="server" Text="Select Feature"></asp:Label>
                                <br />
                                <asp:ListBox ID="lbFeatures" runat="server" AutoPostBack="True" Rows="8" SelectionMode="Single"
                                    Width="220px"></asp:ListBox>
                                <br />
                                <asp:Label ID="lFeatureSummary" runat="server" Text="Feature Summary:"></asp:Label>
                                <br />
                                <asp:Label ID="Label1" runat="server" Text="Est. Hours: "></asp:Label>
                                <asp:Label ID="lFeatEstHours" runat="server"></asp:Label>
                                <br />
                                <asp:Label ID="lSubtaskTotal" runat="server" Text="Total Subtasks: "></asp:Label>
                                <asp:Label ID="lSubtaskCount" runat="server"></asp:Label>
                            </asp:Panel>
                        </td>
                        <td>
                            <asp:Button ID="bAddToSprint" runat="server" Text="--&gt;" CausesValidation="False" />
                            <br />
                            <asp:Button ID="bRemoveFromSprint" runat="server" Text="&lt;--" CausesValidation="False" />
                        </td>
                        <td>
                            <br />
                            <asp:Panel ID="pFeaturesInSprint" runat="server">
                                <asp:Label ID="lFeaturesInSprint" runat="server" Text="Features In Sprint"></asp:Label>
                                <br />
                                <asp:ListBox ID="lbFeaturesInSprint" runat="server" Rows="8" Width="220px"></asp:ListBox>
                                <br />
                                <br />
                                <asp:Label ID="lEstFeatHours" runat="server" Text="Est. Sprint Feature Hours: "></asp:Label>
                                <asp:Label ID="lSumOfFeatHours" runat="server"></asp:Label>
                                <br />
                                <asp:Label ID="lDevHrsRemaining" runat="server" Text="Developer Hours Remaining: "></asp:Label>
                                <asp:Label ID="lRemainDevHours" runat="server"></asp:Label>
                                <br />
                            </asp:Panel>
                        </td>
                        <td>
                            <asp:Button ID="bSprintDetailFinish" runat="server" Text="Review Sprint" CausesValidation="False" />
                            <br />
                            <br />
                        </td>
                    </tr>
                </table>
                <br />
            </asp:Panel>
            <asp:Panel ID="pSprintDetailSummary" runat="server" Visible="False">
                <asp:Label ID="lAddedFeatures" runat="server" Text="The following features were added:  "
                    Visible="False"></asp:Label>
                <asp:LinkButton ID="linkSprintDetailEdit" runat="server" CausesValidation="False">Edit</asp:LinkButton>
                <asp:BulletedList ID="blFeaturesInSprint" runat="server">
                </asp:BulletedList>
                <br />
                <asp:Button ID="bCreateSprint" runat="server" Text="Create Sprint" />
                <br />
                <asp:Label ID="lOutcome" runat="server"></asp:Label>
            </asp:Panel>
            <asp:Panel ID="pSubtasks" runat="server" Visible="False">
                <asp:Label ID="lFeatureSubtasks" runat="server" Text="Subtasks for Selected Feature: "></asp:Label>
                <asp:GridView ID="gvSubtasks" runat="server" AutoGenerateSelectButton="True" AutoGenerateColumns="false"
                    DataKeyNames="taskId">
                    <Columns>
                        <asp:BoundField DataField="taskName" HeaderText="Subtask Name" />
                        <asp:BoundField DataField="taskDesc" HeaderText="Description" />
                        <asp:BoundField DataField="priorityDesc" HeaderText="Priority" />
                        <asp:BoundField DataField="taskEstimatedTime" HeaderText="Est. Hrs" />
                    </Columns>
                </asp:GridView>
                <br />
            </asp:Panel>
            <asp:Panel ID="pTaskAddEdit" runat="server" Visible="false">
                <table>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <asp:Label ID="lTaskOutcome" runat="server" Visible="false" />
                        </td>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lName" runat="server">Subtask Name</asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="tTaskName" runat="server" />
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="ReqFieldTaskName" runat="server" 
                                ControlToValidate="tTaskName" ErrorMessage="Subtask Name Required">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lDesc" runat="server" Text="Task Description"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="tDesc" runat="server" MaxLength="150" Rows="5" 
                                TextMode="MultiLine" Width="250px" />
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="ReqFieldDesc" runat="server" 
                                ControlToValidate="tDesc" ErrorMessage="Description Required">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lPriority" runat="server" Text="Priority"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlPriorities" runat="server" />
                            <asp:RequiredFieldValidator ID="ReqFieldPriority" runat="server" 
                                ControlToValidate="ddlPriorities" ErrorMessage="Priority Required">*</asp:RequiredFieldValidator>
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lEstTime" runat="server" Text="Est. Time"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="tEstTime" runat="server"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HiddenField ID="hTaskId" runat="server" />
                        </td>
                        <td>
                            <asp:Button ID="bUpdateTask" runat="server" Text="Update" />
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <asp:ValidationSummary ID="ValidationSummary" runat="server" />
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
            </asp:Panel>
            <br />
            <asp:Button ID="bNewSprint" runat="server" Text="Create New Sprint" Visible="False" />
            <asp:HiddenField ID="hSprintId" runat="server" />
            <asp:HiddenField ID="hSumOfFeatHours" runat="server" />
            <asp:HiddenField ID="hSumOfDevHours" runat="server" />
            <br />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
